import request from "@/utils/request";

/**
 * 员工分页查询
 * @param {*} params 
 * @returns 
 */
export function empPageQuery(params) {
    return request({
        url: '/admin/employees/pageQuery',
        method: 'post',
        data: params
    })
}

/**
 * 删除员工
 * @param {*} param 
 * @returns 
 */
export function deleteEmp(param) {
    return request({
        url: `/admin/employees/delete/${param}`,
        method: 'delete'
    })
}

/**
 * 创建员工
 * @param {*} params 
 * @returns 
 */
export function empCreate(params) {
    return request({
        url: "/admin/employees/add",
        method: 'post',
        data: params
    })
}

/**
 * 编辑员工
 * @param {*} param 
 * @param {*} params 
 * @returns 
 */
export function empEdit(param, params) {
    return request({
        url: `/admin/employees/update/${param}`,
        method: 'put',
        data: params
    })
}